#! /bin/sh

name=nettle
version=3.10.1
revision=1
tarball_url="https://ftp.gnu.org/gnu/nettle/nettle-${version}.tar.gz"
tarball_blake2b="da2e82e647904e855a0e0bd1efee3b610b33de1a722f5d652deeca083d1983c5ee66754233a0917d3bb91bb5a527a3e80cd5fe18f7c25986076b2388910995b5"
imagedeps="build-essential"
hostdeps="gcc pkg-config"
deps="core-libs gmp"

prepare() {
    autotools_recursive_regen
}

configure() {
    autotools_configure \
        CFLAGS="$TARGET_CFLAGS -std=gnu17"
}

build() {
    make -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" make install

    post_package_strip
}
